=begin pod

=TITLE role Mixy

=SUBTITLE Collection of distinct objects with Real weights

    role Mixy does Baggy { }

A role for collections of weighted values. See L<Mix> and L<MixHash>.
C<Mixy> objects differ from L<Baggy> objects in that the weights of
C<Mixy> are L<Real>s rather than L<Int>s.

=head1 Methods

=head2 method total

    method total(--> Real)

Returns the sum of all the weights

    mix('a', 'b', 'c', 'a', 'a', 'd').total == 6; # RESULT: «True»
    %(a => 5.6, b => 2.4).Mix.total == 8;         # RESULT: «True»

=head2 method roll

    method roll($count = 1)

Similar to a L<Bag>.roll, but with C<Real> weights rather than integral
ones.

=head1 See Also

L<Sets, Bags, and Mixes|/language/setbagmix>

=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
